Conversation
|
Awesome! Will this boost the visual quality, too? Or is it just refactoring to get rid of legacy code? |
|
If we can get the shaders to work it will greatly increase the quality. However the shaders are written in DirectX/Cg style and may need some converting to GLSL style. I dunno anything about doing that so someone else needs to help. |
|
Maybe twitter can help? I tweeted about it here: https://twitter.com/axe312ger/status/968429518095634432 |
|
I'll put up a status update on where things are at in the next few weeks.. stay tuned |
|
I'm not working on anything right now for projectM (busy with |
|
Any chance this can help?
|
|
Very cool! Feel free to give it a try. The shader code is shoved inside the preset files in a funky format though so you'd have to parse it out, convert it, and reinsert it |
Merge master + work on HLSL->GLSL transpilation
|
I'm giving https://github.com/Thekla/hlslparser a try - it should transpile from HLSL to GLSL. I've got it hooked up, now work needs to be done on passing in the variables and texture samplers from projectM into the shaders. Then maybe shaders will work! |
|
Some syntax issues and GL versioning issues but it's close! I think! |
- miising keywords - rsqrt function - modulo support - preprocessor if/else/endif support - several small fixes
|
Status:
To do: fix rendering differences against winamp/milkdrop. Some presets are correctly rendered but other have visual issues. |
| loadTextureDir(); | ||
|
|
||
| loadTextureDir(std::string(DATADIR_PATH) + "/presets"); | ||
| loadTextureDir(std::string(DATADIR_PATH) + "/textures"); |
|
Bravo! Good stuff 👍 |
|
Got a crash: |
|
doesn't crash if i disable threading |
No, my modifications have many impacts on Metal and HLSL generators and it's a lot of work to make sure these will still generate valid code.
Could you provide a more explicit backtrace callstack (with files and line number) ? |
|
Anything left to do @deltaoscarmike? Is it good to go? Can I help with anything? |
|
@deltaoscarmike merge y/n? |
|
Yes |
Re-enable shaders on modern platforms by transpiling HLSL to GLSL on the fly. Better GLES support. Running successfully on embedded systems with GLES and shaders. Compiles and almost runs with emscripten now (#92). Mega props 👏 => @deltaoscarmike <= 👏
Trying to get rid of super ancient unsupported nVidia Cg framework and use standard GL shaders.
The shaders in preset files are written in HLSL for DirectX. projectM used a toolkit from nVidia called Cg to handle them, but Cg is long deprecated and obsolete.
I'm attempting to use https://github.com/Thekla/hlslparser to transpile from HLSL to GLSL on the fly, and it's close to working but has some syntax issues.
The main conversion is done in:
https://github.com/projectM-visualizer/projectm/pull/26/files#diff-6df95f02d59c83baf42ed81c8668722a
https://github.com/projectM-visualizer/projectm/pull/26/files#diff-f4b5c1904e3d8fa6c1248fe1ac843d79
This may be close to working but it has issues right now. Needs work.